--- import type { GetStaticPaths, InferGetStaticPropsType } from "astro"; import { getCollection } from "astro:content"; import Layout from "../layouts/BaseLayout.astro"; import Pagination from "../components/Pagination.astro"; import PostSummary from "../components/PostSummary.astro"; type Props = InferGetStaticPropsType; export const getStaticPaths = (async ({ paginate }) => { const posts = await getCollection("blog", ({ data }) => { return data.draft !== true; }); posts.sort((a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime()); return paginate(posts, { pageSize: 10, }); }) satisfies GetStaticPaths; const { page } = Astro.props; ---
{page.data.map((post) => )}